package com.haoshuang.zhouzhoubang.ui.page.order.rework.rework.team

import com.haoshuang.zhouzhoubang.R
import com.haoshuang.zhouzhoubang.databinding.ItemTeam9Binding
import com.haoshuang.zhouzhoubang.model.bean.YyBean
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter
import com.mufeng.libs.utils.view.gone
import com.mufeng.libs.utils.view.load
import com.mufeng.libs.utils.view.visible


/**
 * 订单模块中的订单列表适配器
 * */
class TeamListAdapter(data: MutableList<YyBean.ThirdInfo.TeamUser>) :
    BaseBindingQuickAdapter<YyBean.ThirdInfo.TeamUser, ItemTeam9Binding>(data){

    override fun onBindViewHolder(
        holder: BaseBindingHolder,
        position: Int,
        item: YyBean.ThirdInfo.TeamUser?
    ) {
        val binding = ItemTeam9Binding.bind(holder.itemView)
        binding.apply {
            if (item?.order_id.isNullOrBlank()){

                tvAdd.load(item?.avatar, R.mipmap.icon_tjry)
                callPhone.gone()
            }else{
                callPhone.visible()
                tvAdd.load(item?.avatar, R.mipmap.rl)
            }

        }
    }

}